package com.zm.campus.config.sentinel;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.zm.campus.pojo.RespBean;
import com.zm.campus.pojo.RespBeanEnum;

//sentinel服务熔断降级的自定义限流兜底类
public class FuseDegradationBlockHandler {
    public static RespBean doServiceBusy(BlockException blockException){//操作频繁
            return RespBean.error(RespBeanEnum.doServiceBusy);
    }
    public static RespBean serviceBusy(BlockException blockException){//系统繁忙
        return RespBean.error(RespBeanEnum.SystemBusy);
    }
}
